/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.deployment.dao;

import br.com.deployment.daogenerico.DaoGenerico;
import br.com.deployment.entidade.registroimovel.AreaInterpi;
import br.com.deployment.interfaces.AreaInterpiDaoIn;
import java.util.List;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.Query;

/**
 *
 * @author roniere
 */
@Stateless
@LocalBean
public class AreaInterpiDao extends DaoGenerico<AreaInterpi> implements AreaInterpiDaoIn{

    public AreaInterpiDao() {
        super(AreaInterpi.class);
    }

    @Override
    public Boolean exist(int id) {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    
    @Override
    public List<AreaInterpi> findAll(){
        String sql = "Select a from AreaInterpi a where "
                + " a.ativo = true ";
        Query query = getEm().createQuery(sql);
        return query.getResultList();
    }
    
}
